﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;

namespace FirmaTransportowa
{
    class InitializationService
    {
        private void createOccupation(int id, string name)
        {
            new Occupation(id, name).save();
        }

        private void createWorker(int id, string name, string surname, DateTime birthdate, long pesel, int occupation_id)
        {
            new Worker(id, name, surname, birthdate, pesel, occupation_id).save();
        }

        private void createUser(int id, String login, String password, int worker_id)
        {
            new User(id, login, password, worker_id).save();
        }

        private void createLicence(int id, string name)
        {
            new Licence(id, name).save();
        }

        private void createPackage(int id, float weight, string status, DateTime createDate, int sender_id, int recipient_id)
        {
            new Package(id, weight, status, createDate, sender_id, recipient_id).save();
        }

        private void createPackage(int id, float weight, string status, DateTime createDate, int sender_id, int recipient_id, int first_transport_id)
        {
            new Package(id, weight, status, createDate, sender_id, recipient_id, first_transport_id).save();
        }

        private void createPackage(int id, float weight, string status, DateTime createDate, int sender_id, int recipient_id, int first_transport_id, int second_transport_id)
        {
            new Package(id, weight, status, createDate, sender_id, recipient_id, first_transport_id, second_transport_id).save();
        }

        private void createWorkerLicence(int driver_id, int licence_id)
        {
            new WorkerLicence(driver_id, licence_id).save();
        }

        private void createSender(int id, string name, string surname, string postcode, string city, string street, string house_number, string phone)
        {
            new Sender(id, name, surname, postcode, city, street, house_number, phone).save();
        }

        private void createRecipient(int id, string name, string surname, string postcode, string city, string street, string house_number, string phone)
        {
            new Recipient(id, name, surname, postcode, city, street, house_number, phone).save();
        }

        private void createSalary(int id, int worker_id, int occupation_id, DateTime payment_date, float amount)
        {
            new Salary(id, worker_id, occupation_id, payment_date, amount).save();
        }

        private void createVehicle(int vehicle_id, int licence_id, string car_type, int capacity, string engine_number, int swept_volume, string brand, string model)
        {
            new Vehicle(vehicle_id, licence_id, car_type, capacity, engine_number, swept_volume, brand, model).save();
        }

        private void createTransport(int id, int vehicle_id, int worker_id, int driver_id, string status, DateTime transport_date, DateTime transport_start_time,
            DateTime transport_end_time, string start_city, string destination_city, int distance)
        {
            new Transport(id, vehicle_id, worker_id, driver_id, status, transport_date, transport_start_time, transport_end_time, start_city, destination_city, distance).save();
        }

        private void createOccupations()
        {
            createOccupation(1, "kierowca");
            createOccupation(2, "dyspozytor");
            createOccupation(3, "kasjer");
            createOccupation(4, "admin");
            createOccupation(5, "statystyk");
            createOccupation(6, "kierownik");
        }

        private void createWorkers()
        {
            createWorker(1, "Adam", "Nowak", DateTime.ParseExact("24081978", "ddMMyyyy", null), 78082418945, 1);
            createWorker(2, "Jan", "Kowalski", DateTime.ParseExact("11041972", "ddMMyyyy", null), 72041155233, 1);
            createWorker(3, "Karol", "Wieczorek", DateTime.ParseExact("02121981", "ddMMyyyy", null), 81120297599, 1);
            createWorker(4, "Zbigniew", "Zagocki", DateTime.ParseExact("11041986", "ddMMyyyy", null), 86041184601, 1);
            createWorker(5, "Adam", "Leszczyński", DateTime.ParseExact("16011980", "ddMMyyyy", null), 80011662321, 2);
            createWorker(6, "Marian", "Suda", DateTime.ParseExact("30051988", "ddMMyyyy", null), 88053032980, 2);
            createWorker(7, "Zbysław", "Ważny", DateTime.ParseExact("28011979", "ddMMyyyy", null), 79012887452, 2);
            createWorker(8, "Kamil", "Nowicki", DateTime.ParseExact("01011983", "ddMMyyyy", null), 83010198983, 3);
            createWorker(9, "Anna", "Kowalska", DateTime.ParseExact("02111990", "ddMMyyyy", null), 90110231030, 3);
            createWorker(10, "Stefan", "Karwot", DateTime.ParseExact("12031978", "ddMMyyyy", null), 78031239012, 3);
            createWorker(11, "Admin", "Admin", DateTime.ParseExact("09101989", "ddMMyyyy", null), 89100929033, 4);
            createWorker(12, "Jarosław", "Świerczyński", DateTime.ParseExact("23031987", "ddMMyyyy", null), 87032312109, 4);
            createWorker(13, "Mirosław", "Janowski", DateTime.ParseExact("31051978", "ddMMyyyy", null), 78053198729, 5);
            createWorker(14, "Karol", "Kurzydym", DateTime.ParseExact("24071991", "ddMMyyyy", null), 91072409388, 5);
            createWorker(15, "Wacław", "Pannek", DateTime.ParseExact("30091991", "ddMMyyyy", null), 91093034399, 6);
        }

        private void createUsers()
        {
            createUser(1, "kierowca", "kierowca", 1);
            createUser(2, "kierowca2", "kierowca2", 2);
            createUser(3, "kierowca3", "kierowca3", 3);
            createUser(4, "kierowca4", "kierowca4", 4);
            createUser(5, "dyspozytor", "dyspozytor", 5);
            createUser(6, "dyspozytor2", "dyspozytor2", 6);
            createUser(7, "dyspozytor3", "dyspozytor3", 7);
            createUser(8, "kasjer", "kasjer", 8);
            createUser(9, "kasjer2", "kasjer2", 9);
            createUser(10, "kasjer3", "kasjer3", 10);
            createUser(11, "admin", "admin", 11);
            createUser(12, "admin2", "admin2", 12);
            createUser(13, "s", "s", 13);
            createUser(14, "statystyk2", "statystyk2", 14);
            createUser(15, "kierownik", "kierownik", 15);
        }

        private void createLicences()
        {
            createLicence(1, "B");
            createLicence(2, "B+E");
            createLicence(3, "C");
            createLicence(4, "C+E");
            createLicence(5, "C1");
            createLicence(6, "D");
            createLicence(7, "D+E");
            createLicence(8, "D1");
        }

        private void createPackages()
        {
            createPackage(1, 21.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 2, 11);
            createPackage(2, 10.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 4, 13);
            createPackage(3, 11.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 13, 1);
            createPackage(4, 4.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 3, 8);
            createPackage(5, 1.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 12, 1);
            createPackage(6, 7.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 14, 9);
            createPackage(7, 3.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 10, 6);
            createPackage(8, 35.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 5, 4);
            createPackage(9, 14.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 3, 14);
            createPackage(10, 0.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("22092013", "ddMMyyyy", null), 11, 10);
            createPackage(11, 21.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 2, 4);
            createPackage(12, 10.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 6, 7);
            createPackage(13, 11.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 7, 5);
            createPackage(14, 4.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 10, 13);
            createPackage(15, 1.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 1, 2);
            createPackage(16, 7.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 9, 5);
            createPackage(17, 3.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 11, 10);
            createPackage(18, 35.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 4, 6);
            createPackage(19, 14.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("23092013", "ddMMyyyy", null), 9, 8);
            createPackage(20, 0.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 6, 5);
            createPackage(21, 21.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 9, 14);
            createPackage(22, 10.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 2, 5);
            createPackage(23, 11.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 7, 3);
            createPackage(24, 4.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 8, 11);
            createPackage(25, 1.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 7, 4);
            createPackage(26, 7.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 8, 14);
            createPackage(27, 3.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 13, 10);
            createPackage(28, 35.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 6, 1);
            createPackage(29, 14.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 9, 2);
            createPackage(30, 0.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("24092013", "ddMMyyyy", null), 11, 3);
            createPackage(31, 11.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("26092013", "ddMMyyyy", null), 3, 4);
            createPackage(32, 73.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("26092013", "ddMMyyyy", null), 10, 5);
            createPackage(33, 1.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("26092013", "ddMMyyyy", null), 11, 12);
            createPackage(34, 13.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 8, 6);
            createPackage(35, 141.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 9, 5);
            createPackage(36, 9.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 6, 9);
            createPackage(37, 1.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 9, 2);
            createPackage(38, 102.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 6, 5);
            createPackage(39, 17.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 13, 3);
            createPackage(40, 4.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 8, 11);
            createPackage(41, 10.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 7, 4);
            createPackage(42, 75.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 8, 14);
            createPackage(43, 32.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 13, 10);
            createPackage(44, 31.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 6, 1);
            createPackage(45, 19.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 9, 2);
            createPackage(46, 18.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 11, 3);
            createPackage(47, 10.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 7, 4, 10);
            createPackage(48, 75.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 5, 14, 10);
            createPackage(49, 32.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 4, 10, 10);
            createPackage(50, 31.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 6, 1, 10);
            createPackage(51, 19.0f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 7, 2, 10);
            createPackage(52, 18.5f, EnumUtils.getEnumDescription(PackageStatus.NEW), DateTime.ParseExact("25092013", "ddMMyyyy", null), 11, 3, 10);
            createPackage(53, 10.5f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 11, 9, 1, 11);
            createPackage(54, 75.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 2, 10, 1, 11);
            createPackage(55, 32.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 1, 10, 1, 11);
            createPackage(56, 31.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 3, 14, 1, 11);
            createPackage(57, 19.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 8, 8, 1, 11);
            createPackage(58, 18.5f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 9, 14, 1, 11);
            createPackage(59, 10.5f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 11, 9, 1);
            createPackage(60, 75.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 2, 10, 1);
            createPackage(61, 32.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 1, 10, 1);
            createPackage(62, 31.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 3, 14, 1);
            createPackage(63, 19.0f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 8, 8, 1);
            createPackage(64, 18.5f, EnumUtils.getEnumDescription(PackageStatus.SORTED), DateTime.ParseExact("25092013", "ddMMyyyy", null), 9, 14, 1);
        }

        private void createWorkerLicences()
        {
            createWorkerLicence(1, 1);
            createWorkerLicence(1, 2);
            createWorkerLicence(1, 3);
            createWorkerLicence(1, 4);
            createWorkerLicence(2, 1);
            createWorkerLicence(2, 2);
            createWorkerLicence(3, 1);
            createWorkerLicence(3, 2);
            createWorkerLicence(4, 1);
            createWorkerLicence(4, 2);
            createWorkerLicence(4, 3);
            createWorkerLicence(4, 4);
        }

        private void createSenders()
        {
            createSender(1, "Józef", "Malinowski", "44-200", "Rybnik", "Miejska", "11a", "511343900");
            createSender(2, "Stefania", "Zawadzka", "44-200", "Rybnik", "Dworek", "13c/4", "516377821");
            createSender(3, "Martyna", "Przybyła", "44-200", "Rybnik", "Grunwaldzka", "48", "677388290");
            createSender(4, "Marek", "Wójcik", "44-100", "Gliwice", "Tarnogórska", "23", "782901123");
            createSender(5, "Marian", "Opania", "44-100", "Gliwice", "Kasztanowa", "4", "630234878");
            createSender(6, "Karolina", "Zimoń", "44-100", "Gliwice", "Portowa", "110", "738902554");
            createSender(7, "Tomasz", "Walkiewicz", "44-100", "Gliwice", "Portowa", "110", "738902554");
            createSender(8, "Katarzyna", "Kurowska", "40-500", "Katowice", "Kościuszki", "81d/4", "601983747");
            createSender(9, "Łukasz", "Polak", "40-500", "Katowice", "Pszczyńska", "44", "623874802");
            createSender(10, "Krzysztof", "Paniewski", "40-500", "Katowice", "Wrocławska", "15", "813924376");
            createSender(11, "Wacław", "Tarnowski", "44-100", "Gliwice", "Portowa", "110", "630987283");
            createSender(12, "Bogumił", "Kowalik", "44-210", "Rybnik", "Kościuszki", "81d/4", "543988640");
            createSender(13, "Patryk", "Kołakowski", "40-217", "Rybnik", "Floriańska", "23/11", "7668948928");
            createSender(14, "Magdalena", "Słomczyńska", "40-500", "Katowice", "Uniwersytecka", "10", "755893093");
        }

        private void createRecipients()
        {
            createRecipient(1, "Józef", "Malinowski", "44-200", "Rybnik", "Miejska", "11a", "511343900");
            createRecipient(2, "Stefania", "Zawadzka", "44-200", "Rybnik", "Dworek", "13c/4", "516377821");
            createRecipient(3, "Martyna", "Przybyła", "44-200", "Rybnik", "Grunwaldzka", "48", "677388290");
            createRecipient(4, "Marek", "Wójcik", "44-100", "Gliwice", "Tarnogórska", "23", "782901123");
            createRecipient(5, "Marian", "Opania", "44-100", "Gliwice", "Kasztanowa", "4", "630234878");
            createRecipient(6, "Karolina", "Zimoń", "44-100", "Gliwice", "Portowa", "110", "738902554");
            createRecipient(7, "Tomasz", "Walkiewicz", "44-100", "Gliwice", "Portowa", "110", "738902554");
            createRecipient(8, "Katarzyna", "Kurowska", "40-500", "Katowice", "Kościuszki", "81d/4", "601983747");
            createRecipient(9, "Łukasz", "Polak", "40-500", "Katowice", "Pszczyńska", "44", "623874802");
            createRecipient(10, "Krzysztof", "Paniewski", "40-500", "Katowice", "Wrocławska", "15", "813924376");
            createRecipient(11, "Wacław", "Tarnowski", "44-100", "Gliwice", "Portowa", "110", "630987283");
            createRecipient(12, "Bogumił", "Kowalik", "44-210", "Rybnik", "Kościuszki", "81d/4", "543988640");
            createRecipient(13, "Patryk", "Kołakowski", "40-217", "Rybnik", "Floriańska", "23/11", "7668948928");
            createRecipient(14, "Magdalena", "Słomczyńska", "40-500", "Katowice", "Uniwersytecka", "10", "755893093");
        }

        private void createSalaries()
        {
            createSalary(1, 1, 3, DateTime.ParseExact("10022013", "ddMMyyyy", null), 2450f);
            createSalary(2, 1, 3, DateTime.ParseExact("10032013", "ddMMyyyy", null), 2450f);
            createSalary(3, 1, 3, DateTime.ParseExact("10042013", "ddMMyyyy", null), 2450f);
            createSalary(4, 1, 3, DateTime.ParseExact("10052013", "ddMMyyyy", null), 2450f);
            createSalary(5, 1, 3, DateTime.ParseExact("10062013", "ddMMyyyy", null), 2450f);
            createSalary(6, 1, 3, DateTime.ParseExact("10072013", "ddMMyyyy", null), 2450f);
            createSalary(7, 1, 3, DateTime.ParseExact("10082013", "ddMMyyyy", null), 2450f);
            createSalary(8, 1, 1, DateTime.ParseExact("10092013", "ddMMyyyy", null), 3210f);
            createSalary(9, 5, 2, DateTime.ParseExact("10092013", "ddMMyyyy", null), 2450f);
            createSalary(10, 9, 3, DateTime.ParseExact("10092013", "ddMMyyyy", null), 2000f);
            createSalary(11, 11, 4, DateTime.ParseExact("10092013", "ddMMyyyy", null), 3650f);
            createSalary(12, 13, 5, DateTime.ParseExact("10092013", "ddMMyyyy", null), 3480f);
        }

        private void createVehicles()
        {
            createVehicle(1, 1, "Van", 800, "83298749201", 1400, "Renault", "Kangoo");
            createVehicle(2, 1, "Van", 800, "83298749202", 1400, "Renault", "Kangoo");
            createVehicle(3, 1, "Van", 800, "83298749203", 1400, "Renault", "Kangoo");
            createVehicle(4, 1, "Van", 800, "83298749204", 1400, "Renault", "Kangoo");
            createVehicle(5, 1, "Van", 800, "83298749205", 1400, "Renault", "Kangoo");
            createVehicle(6, 1, "Furgon", 1200, "22298749201", 2000, "Renault", "Transit");
            createVehicle(7, 1, "Furgon", 1200, "22298749202", 2000, "Renault", "Transit");
            createVehicle(8, 1, "Furgon", 1200, "22298749203", 2000, "Renault", "Transit");
            createVehicle(9, 1, "Furgon", 1200, "22298749204", 2000, "Renault", "Transit");
            createVehicle(10, 1, "Furgon", 1200, "22298749205", 2000, "Renault", "Transit");
            createVehicle(11, 3, "Furgon", 1600, "24298749201", 2500, "Renault", "Master");
            createVehicle(12, 3, "Furgon", 1600, "24298749202", 2500, "Renault", "Master");
            createVehicle(13, 3, "Furgon", 1600, "24298749203", 2500, "Renault", "Master");
            createVehicle(14, 3, "Furgon", 1600, "24298749204", 2500, "Renault", "Master");
            createVehicle(15, 3, "Furgon", 1600, "24298749205", 2500, "Renault", "Master");
            createVehicle(16, 4, "Tir", 5250, "24498749203", 6800, "MAN", "TGL");
            createVehicle(17, 4, "Tir", 5250, "24498749204", 6800, "MAN", "TGL");
            createVehicle(18, 4, "Tir", 5250, "24498749205", 6800, "MAN", "TGL");
            createVehicle(19, 3, "Truck", 1700, "24218749201", 3000, "Iveco", "Daily");
            createVehicle(20, 3, "Truck", 1700, "24218749203", 3000, "Iveco", "Daily");
            createVehicle(21, 3, "Truck", 1700, "24218749204", 3000, "Iveco", "Daily");
            createVehicle(22, 3, "Truck", 1700, "24218749205", 3000, "Iveco", "Daily");
        }

        private void createTransports()
        {
            createTransport(1, 1, 5, 1, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("10092013", "ddMMyyyy", null), DateTime.ParseExact("06:00", "HH:mm", null), DateTime.ParseExact("07:00", "HH:mm", null), "Rybnik", "sortownia", 50);
            createTransport(2, 10, 6, 2, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("11092013", "ddMMyyyy", null), DateTime.ParseExact("08:00", "HH:mm", null), DateTime.ParseExact("09:00", "HH:mm", null), "sortownia", "Rybnik", 50);
            createTransport(3, 17, 7, 3, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("13092013", "ddMMyyyy", null), DateTime.ParseExact("06:00", "HH:mm", null), DateTime.ParseExact("07:00", "HH:mm", null), "sortownia", "Katowice", 50);
            createTransport(4, 22, 7, 4, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("14092013", "ddMMyyyy", null), DateTime.ParseExact("08:00", "HH:mm", null), DateTime.ParseExact("09:00", "HH:mm", null), "sortownia", "Rybnik", 50);
            createTransport(5, 10, 6, 2, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("11092013", "ddMMyyyy", null), DateTime.ParseExact("08:00", "HH:mm", null), DateTime.ParseExact("09:00", "HH:mm", null), "Katowice", "sortownia", 50);
            createTransport(6, 17, 7, 3, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("13092013", "ddMMyyyy", null), DateTime.ParseExact("06:00", "HH:mm", null), DateTime.ParseExact("07:00", "HH:mm", null), "Rybnik", "sortownia", 50);
            createTransport(7, 22, 7, 4, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("14092013", "ddMMyyyy", null), DateTime.ParseExact("08:00", "HH:mm", null), DateTime.ParseExact("09:00", "HH:mm", null), "sortownia", "Rybnik", 50);
            createTransport(8, 1, 7, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("08:30", "HH:mm", null), DateTime.ParseExact("09:00", "HH:mm", null), "sortownia", "Gliwice", 30);
            createTransport(9, 1, 5, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("10:15", "HH:mm", null), DateTime.ParseExact("11:00", "HH:mm", null), "Gliwice", "sortownia", 30);
            createTransport(10, 11, 5, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("13:30", "HH:mm", null), DateTime.ParseExact("14:00", "HH:mm", null), "Gliwice", "sortownia", 30);
            createTransport(11, 11, 6, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("14:00", "HH:mm", null), DateTime.ParseExact("15:00", "HH:mm", null), "sortownia", "Katowice", 30);
            createTransport(12, 18, 7, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("27092013", "ddMMyyyy", null), DateTime.ParseExact("07:30", "HH:mm", null), DateTime.ParseExact("08:30", "HH:mm", null), "sortownia", "Katowice", 50);
            createTransport(13, 18, 6, 1, EnumUtils.getEnumDescription(TransportStatus.PLANNED), DateTime.ParseExact("27092013", "ddMMyyyy", null), DateTime.ParseExact("08:30", "HH:mm", null), DateTime.ParseExact("09:45", "HH:mm", null), "Katowice", "sortownia", 50);
            createTransport(14, 1, 5, 1, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("10:15", "HH:mm", null), DateTime.ParseExact("11:00", "HH:mm", null), "Gliwice", "sortownia", 60);
            createTransport(15, 11, 5, 1, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("13:30", "HH:mm", null), DateTime.ParseExact("14:00", "HH:mm", null), "Gliwice", "sortownia", 50);
            createTransport(16, 11, 6, 2, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("26092013", "ddMMyyyy", null), DateTime.ParseExact("14:00", "HH:mm", null), DateTime.ParseExact("15:00", "HH:mm", null), "sortownia", "Katowice", 10);
            createTransport(17, 18, 7, 2, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("27092013", "ddMMyyyy", null), DateTime.ParseExact("07:30", "HH:mm", null), DateTime.ParseExact("08:30", "HH:mm", null), "sortownia", "Katowice", 70);
            createTransport(18, 18, 6, 2, EnumUtils.getEnumDescription(TransportStatus.CLOSED), DateTime.ParseExact("27092013", "ddMMyyyy", null), DateTime.ParseExact("08:30", "HH:mm", null), DateTime.ParseExact("09:45", "HH:mm", null), "Katowice", "sortownia", 20);
        }

        public void init()
        {
            createOccupations();
            createWorkers();
            createUsers();
            createLicences();
            createPackages();
            createWorkerLicences();
            createSenders();
            createRecipients();
            createSalaries();
            createVehicles();
            createTransports();
        }
    }
}
